{% extends "root.html" %}
{% load url from future %}


{% block title %}
Login
{% endblock %}

{% block root_content %}


<div class="mainLocation description">
    <p>Worlds best Kalapankki!</p>
</div>

<div class="mainLocation" id="loginlogout">

    <form method="post" action="{% url 'django.contrib.auth.views.login' %}">
        {% csrf_token %}
        <h1>Login to Kalapankki</h1>
        {% if form.errors %}
        <div class="error">
            Your username and password didn't match. Please try again.
        </div>
        {% endif %}
        <table>
            <tr>
                <td>{{ form.username.label_tag }}</td>
                <td>{{ form.username }}</td>
            </tr>
            <tr>
                <td>{{ form.password.label_tag }}</td>
                <td>{{ form.password }}</td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="submit" class="submit" value="Login" />
                    <input type="hidden" name="next" value="{{ next }}" />
                </td>
            </tr>
            <tr>
                <td></td>
                <td style="font-size: 13px"><br/>Haven't signed up yet? <br/>
                    <a href="{% url 'register' %}">Sign up now!</a></td>
            </tr>
        </table>
    </form>

</div>
{% endblock %}
